<template>
    <div class="TaskWarp">
        <div class="divMain LianXian" @click.stop>
            <div class="divTitle" v-if="!Questions.transit">
                <h2>{{Questions.child.QtypeName}}：{{Questions.child.QuestionRemark}}</h2>
            </div>
            <div class="LianXianWarp">
                <div class="show topBottom cb">
                    <div class="showtop">
                        <!--上侧-->
                        <span v-for="(item,index) in Questions.child.stem[0].opts" v-if="index%2 == 0" class="showitem" v-html="item.OptionContent"></span>
                    </div>
                    <div class="showbottom">
                        <!--下侧-->
                        <span v-for="(item,index) in Questions.child.stem[0].opts" v-if="index%2 == 1" class="showitem" v-html="item.OptionContent"></span>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: "lianXian",
    props: ["Questions","defAnswer"],
    methods: {},
    mounted() {
        var _this = this
        // if (!_this.Questions.transit) $('.LianXianWarp').height(parseFloat($('.LianXian').height()) - 80)
        // window.onresize = function () {
        //     if (!_this.Questions.transit) $('.LianXianWarp').height(parseFloat($('.LianXian').height()) - 80)
        // }
        $('.showitem img').each(function () {
            $(_this).upImgSrc()
        })

    },
    data() {
        return {}
    }
}


</script>
<style lang="scss" rel="stylesheet/scss">
@import '../../../../assets/css/public.scss';
.showbottom .showitem p {
    display: block;
    width: 100%;
    height: 100%;
    img {
        display: block;
        width: 100%;
        height: 100%;
    }
}

.show.topBottom .showitem {
    box-shadow: $boxShadow;
}

.showitem {
    width: 20%;
    height: 50%;
    margin: 0 10px;
}
</style>
<style lang="scss" rel="stylesheet/scss" scoped>
@import '../../../../assets/css/public.scss';

.TaskWarp {
    height: 90%;
    width: 90%;
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;

    .divMain {
        position: absolute;
        overflow: hidden;
        height: 100%;
        width: 100%;
        .LianXianWarp {
            background-image: url('../../../../assets/shitimaingb.png');
            background-repeat: repeat;
            position: relative;
            height: 100%;
            overflow: auto;
            padding: 40px auto 0;
            .show.topBottom {
                height: 100%;
                .showtop {
                    margin-top: 60px;
                }
                .showtop,
                .showbottom {
                    height: 50%;
                    display: flex;
                    flex-wrap: nowrap;
                    justify-content: center;
                    .showitem {
                        background: #fff;
                        border-radius: 15px;
                        text-align: center;
                        color: #000000;
                        overflow: hidden;
                        position: relative;
                    }
                }
            }
        }
    }
}
</style>
